package com.eorchis.module.basedata.manager.impl;

import com.eorchis.module.basedata.dao.IBaseDataDao;
import com.eorchis.module.basedata.domain.BaseData;
import com.eorchis.module.basedata.domain.BaseDataCondition;
import com.eorchis.module.basedata.domain.BaseDataTypeCondition;
import com.eorchis.module.basedata.manager.IBaseDataManager;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service("com.eorchis.module.basedata.manager.impl.BaseDataManagerImpl")
public class BaseDataManagerImpl
  implements IBaseDataManager
{

  @Autowired
  @Qualifier("com.eorchis.module.basedata.dao.impl.BaseDataDaoImpl")
  private IBaseDataDao baseDataDao;

  public void addBaseData(BaseData baseData)
    throws Exception
  {
    this.baseDataDao.addBaseData(baseData);
  }

  public boolean checkDataCodeIsRepeat(BaseData baseData) throws Exception
  {
    return this.baseDataDao.checkDataCodeIsRepeat(baseData);
  }

  public void discardOrReuseBaseData(BaseDataCondition condition)
    throws Exception
  {
    this.baseDataDao.discardOrReuseBaseData(condition);
  }

  public List<BaseData> getAllBaseDataByTypeID(BaseDataTypeCondition condition)
    throws Exception
  {
    return this.baseDataDao.getAllBaseDataByTypeID(condition);
  }

  public BaseData getBaseData(BaseDataCondition condition) throws Exception
  {
    return this.baseDataDao.getBaseData(condition);
  }

  public BaseData getBaseDataByID(String id) throws Exception
  {
    return this.baseDataDao.getBaseDataByID(id);
  }

  public List<BaseData> getBaseDataList(BaseDataCondition condition)
    throws Exception
  {
    return this.baseDataDao.getBaseDataList(condition);
  }

  public List<BaseData> getBaseDataListByIDArray(String[] idArray)
    throws Exception
  {
    return this.baseDataDao.getBaseDataListByIDArray(idArray);
  }

  public List<BaseData> listBaseData(BaseDataCondition condition)
    throws Exception
  {
    return this.baseDataDao.listBaseData(condition);
  }

  public Long listBaseDataCount(BaseDataCondition condition) throws Exception
  {
    return this.baseDataDao.listBaseDataCount(condition);
  }

  public void updateBaseData(BaseData baseData) throws Exception
  {
    this.baseDataDao.updateBaseData(baseData);
  }

  public BaseData viewBaseData(BaseDataCondition condition) throws Exception
  {
    return this.baseDataDao.viewBaseData(condition);
  }
}